<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../引入vue2.js"></script>
</head>

<body>
    <div id="app">
        <!-- lazy 修饰符：失去焦点的时候触发 -->
        英雄:<input type="text" v-model.lazy="hero" />
        hero--{{hero}}
        <hr />
        <!-- vm.age 默认当作字符串处理 -->
        <!-- number 解析为 number -->
        年龄：<input type="number" v-model.number="age" />
        age--{{age}}
        <hr />
        <!-- trim 去除头尾空格 -->
        用户名：<input type="text" v-model.trim="uname" />
        uname--{{uname}}
    </div>
</body>
<script>
    let vm = new Vue({
        el: '#app',
        data: {
            hero: "",
            age: 0,
            uname: ""
        },
        methods: {

        },
    })
</script>

</html>